﻿use RDW
go

Insert into Location values(N'上海','Shanghai')
Insert into Location values(N'北京','Beijing')
Insert into Location values(N'南京','Nanjing')
Insert into Location values(N'成都','Chengdu')
Insert into Location values(N'青岛','Qingdao')

Select * from Location
GO

Insert into Lab Values(1,N'WCDMA','')
Insert into Lab Values(1,N'LTE','')
Insert into Lab Values(1,N'GSM','')
Insert into Lab Values(1,N'FAPU(PON,DLS)','')
Insert into Lab Values(2,N'WCDM & LTE','')
Insert into Lab Values(2,N'EMS','')
Insert into Lab Values(3,N'Common Platform & WCDMA','')
Insert into Lab Values(4,N'WDM Lab','')
Insert into Lab Values(4,N'OMSN Lab','')
Insert into Lab Values(4,N'NM Lab','')
Insert into Lab Values(4,N'WT Lab','')
Insert into Lab Values(5,N'IMS Lab','')
Insert into Lab Values(5,N'APP Lab','')
Insert into Lab Values(5,N'Gateway Lab','')

Select * from Lab
GO

Insert into VisitType Values(N'国内','Domestic',0,1)
Insert into VisitType Values(N'国外','Foreign',0,1)
Insert into VisitType Values(N'中国移动','China Mobile',1,2)
Insert into VisitType Values(N'中国联通','China Unicom',1,2)
Insert into VisitType Values(N'中国电信','China Telecom',1,2)
Insert into VisitType Values(N'国外运营商','Foreign Operator',2,2)
Insert into VisitType Values(N'企业行业客户','Enterprise & Industry Customer',0,2)
Insert into VisitType Values(N'政府社会团体','Government & Social Group',0,2)
Insert into VisitType Values(N'其它','Others',0,2)

Select * from VisitType
GO

Insert into SysSetting Values('CancelBeforeHour','24','')
Insert into SysSetting Values('ApproveWaitingDay','2','')
Insert into SysSetting Values('ApplyPeriodMinute','30','')
Insert into SysSetting Values('FeedbackEmailRemindDay','5','')
Insert into SysSetting Values('FeedbackCompleteMonth','2','')
Insert into SysSetting Values('CreditScoreIncrese','1','')
Insert into SysSetting Values('CreditScoreDecrese','1','')
Insert into SysSetting Values('DefaultCreditScore','5','')
Insert into SysSetting Values('ApplyBeforeHour','24','')
Insert into SysSetting Values('MinCreditScore','0','')
Insert into SysSetting Values('MaxCreditScore','5','')
Insert into SysSetting Values('ApplicationUrl','http://XXX','')

Select * from SysSetting
GO
INSERT INTO [Reason] VALUES(N'天灾( 地震、台风等)','Calamity')
INSERT INTO [Reason] VALUES(N'停电','Outage')
INSERT INTO [Reason] VALUES(N'政府要求','GovernmentRequest ')
INSERT INTO [Reason] VALUES(N'法律','Law')
select * from [Reason]
GO

INSERT INTO [Question] VALUES(N'整体布局及演示路线安排','How about the overall layout and demonstration routing','1')
INSERT INTO [Question] VALUES(N'研发之窗的演示内容是否符合来访需求 ','Do these demos meet the needs of visitors','1')
INSERT INTO [Question] VALUES(N'讲解人员是否就演示计划与陪同人员事先进行过沟通','Whether the demonstrator communicate with the accompanying staff about the plan of demonstration in advance','1')
INSERT INTO [Question] VALUES(N'讲解人员的讲解内容是否符合来访客户的要求','Whether the demonstration information presented by the demonstrator meet the needs of visitors','1')
INSERT INTO [Question] VALUES(N'讲解人员对整体参观及讲解时间的掌控','How well does the demonstrator control the visiting time and the presentation time','1')
INSERT INTO [Question] VALUES(N'讲解人员对整个演示过程中所有业务的熟悉程度如何','Whether the demonstrator is familiar with all the service during the whole demonstration','1')
INSERT INTO [Question] VALUES(N'对于来访者的提问，讲解人员能否妥善处理','Whether the demonstrator can properly deal with the questions from visitors','1')
select * from [Question]
GO
INSERT INTO [Answer] VALUES(N'1',N'合理','Reasonable','')
INSERT INTO [Answer] VALUES(N'1',N'一般','General','')
INSERT INTO [Answer] VALUES(N'1',N'有待改进','To Improve','')
INSERT INTO [Answer] VALUES(N'2',N'符合','Meet','')
INSERT INTO [Answer] VALUES(N'2',N'部分符合','Partly Meet','')
INSERT INTO [Answer] VALUES(N'2',N'不符合','Not Meet','')
INSERT INTO [Answer] VALUES(N'3',N'是','Yes','')
INSERT INTO [Answer] VALUES(N'3',N'否','No','')
INSERT INTO [Answer] VALUES(N'4',N'符合','Meet','')
INSERT INTO [Answer] VALUES(N'4',N'不符合','Not Meet','')
INSERT INTO [Answer] VALUES(N'5',N'太长','Too Long','')
INSERT INTO [Answer] VALUES(N'5',N'适中','Just Right','')
INSERT INTO [Answer] VALUES(N'5',N'太短','Too Short','')
INSERT INTO [Answer] VALUES(N'6',N'熟练','Familiar','')
INSERT INTO [Answer] VALUES(N'6',N'一般','General','')
INSERT INTO [Answer] VALUES(N'6',N'不熟练','Not Familiar','')
INSERT INTO [Answer] VALUES(N'7',N'能','Yes','')
INSERT INTO [Answer] VALUES(N'7',N'不能','No','')
select * from [Answer]
GO


declare @roleid int
insert into  [Role] VALUES('System Administrator'     ,N'负责维护用户列表、分配权限，以及对主数据的维护和系统参数的设置')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 1,@roleid

--Insert user for admini Priviledge
declare @userid int
insert [User](Account,IsActive,SyncTime) values('Admin',1,GETDATE())
set @userid=@@IDENTITY
insert [UserRole](UserId,RoleId) values(@userid,@roleid)

insert into  [Role] VALUES('R&D Center Manager'        ,N'负责对参观申请流程的审批以及上传精彩图片、发布公告')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 2,@roleid
insert into  [Role] VALUES('End User'                 ,N'默认ASB内部的具有域账号的所有员工均为该系统的End User角色，可提交参观申请')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 3,@roleid
insert into  [Role] VALUES('Guest'                     ,N'默认所有具有对ASB内部网络访问权限的用户都为该系统的Guest角色，除不能提交参观申请外，其他的权限与End User相同')
insert into  [Role] VALUES('Site Manager-ShangHai'                    ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 4,@roleid
insert into  [Role] VALUES('Site Manager-Beijing'                     ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 4,@roleid
insert into  [Role] VALUES('Site Manager-Nanjing'                     ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 4,@roleid
insert into  [Role] VALUES('Site Manager-Chengdu'                     ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 4,@roleid
insert into  [Role] VALUES('Site Manager-Qingdao'                     ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 4,@roleid
insert into  [Role] VALUES('Lab Manager-WCDMA'                        ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-LTE'                          ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-GSM'                          ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-FAPU (PON, DLS)'              ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-WCDMA & LTE'                    ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-EMS'                          ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-Common Platform & WCDMA'     ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-WDM Lab'                      ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-OMSN Lab'                     ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-NM Lab'                       ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-WT Lab'                       ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-IMS Lab'                      ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-APP Lab'                      ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid
insert into  [Role] VALUES('Lab Manager-Gateway Lab'                  ,N'')
set @roleid=@@IDENTITY
exec cp_initalPriviledge 5,@roleid

select * from [Role]
select * from [Priviledge]
GO

--添加测试用户，正式上线需要删除
insert [User](Account,NameEN,NameCN,IsActive,SyncTime) values('test1','test1','test1',1,GETDATE())
insert [User](Account,NameEN,NameCN,IsActive,SyncTime) values('test2','test2','test2',1,GETDATE())
insert [User](Account,NameEN,NameCN,IsActive,SyncTime) values('test3','test3','test3',1,GETDATE())
insert [User](Account,NameEN,NameCN,IsActive,SyncTime) values('test4','test4','test4',1,GETDATE())
insert [User](Account,NameEN,NameCN,IsActive,SyncTime) values('test5','test5','test5',1,GETDATE())

GO
